import { createStore } from 'vuex'

export default createStore({
	state: {
		logon: false,
		user: null, // Initialize user as null or with default values
		address: null,
		chain: null,
		balance: null,
		acting: null,
	},
	mutations: {
		setLogon(state, value) {
			state.logon = value
		},
		setUser(state, user) {
			state.user = user
		},
		setAddress(state, address) {
			state.address = address
		},
		setChain(state, chain) {
			state.chain = chain
		},
		setBalance(state, balance) {
			state.balance = balance
		},
		setActing(state, acting) {
			state.acting = acting
		},
	},
	getters: {},
	actions: {},
	modules: {},
})
